Public Class EnemyTank_Class Inherits Label Public Ew_left_image, Ew_right_image, Ew_up_image, Ew_down_image As Image '各个敌机的图片 Public Ey_left_image, Ey_right_image, Ey_up_image, Ey_down_image As Image Public Eg_left_image, Eg_right_image, Eg_up_image, Eg_down_image As Image Public Egt_left_image, Egt_right_image, Egt_up_image, Egt_down_image As Image Public EE_left_image, EE_rightT_image, EE_up_image, EE_down_image As Image Public isTimeSet As Boolean = False Public e_direction As Integer = 0 '用来表示敌机的AI Public only_oneBoolen As Boolean = True Public em_rt_count As Integer = 0 Public rt_count As Integer Public 子弹是否拼撞 As Boolean = False Public 子弹是否第一次发射 As Boolean = True Public 敌机炸图片加载次数 As Integer = 0 Public Enum EnemyTank_DirectionType EnemyTank_LeftType EnemyTank_RightType EnemyTank_UpType EnemyTank_DownType End Enum Public Enum E_BUT_DirectionType Enemy_BUT_LeftType Enemy_BUT_RightType Enemy_BUT_UpType Enemy_BUT_DownType End Enum Public E_TYPE As EnemyTank_DirectionType = EnemyTank_DirectionType.EnemyTank_DownType '敌方坦克的方向类型 Public E_BUT_TYPE_Direction As E_BUT_DirectionType = E_BUT_DirectionType.Enemy_BUT_DownType '子弹的方向类型 Public Sub New() Width = 60 Height = 60 BackColor = Color.Black Ew_left_image = My.Resources.Resource1.wl Ew_right_image = My.Resources.Resource1.wr Ew_up_image = My.Resources.Resource1.wu Ew_down_image = My.Resources.Resource1.wd Ey_left_image = My.Resources.Resource1.yellowL Ey_right_image = My.Resources.Resource1.yellowR Ey_up_image = My.Resources.Resource1.yellowU Ey_down_image = My.Resources.Resource1.yellowD Eg_left_image = My.Resources.Resource1.greenL Eg_right_image = My.Resources.Resource1.greenR Eg_up_image = My.Resources.Resource1.greenU Eg_down_image = My.Resources.Resource1.greenD Egt_left_image = My.Resources.Resource1.green2L Egt_right_image = My.Resources.Resource1.green2R Egt_up_image = My.Resources.Resource1.green2U Egt_down_image = My.Resources.Resource1.green2D Dim rt As New Random() Select Case rt.Next(1, 5) Case 1 Image = Ew_down_image rt_count = 1 EE_left_image = Ew_left_image EE_rightT_image = Ew_right_image EE_up_image = Ew_up_image EE_down_image = Ew_down_image Case 2 Image = Ey_down_image rt_count = 2 EE_left_image = Ey_left_image EE_rightT_image = Ey_right_image EE_up_image = Ey_up_image EE_down_image = Ey_down_image Case 3 Image = Eg_down_image rt_count = 3 EE_left_image = Eg_left_image EE_rightT_image = Eg_right_image EE_up_image = Eg_up_image EE_down_image = Eg_down_image Case 4 Image = Egt_down_image rt_count = 4 EE_left_image = Egt_left_image EE_rightT_image = Egt_right_image EE_up_image = Egt_up_image EE_down_image = Egt_down_image End Select Dim rrt As New Random em_rt_count = rrt.Next(1, 11) End Sub Public Sub 改变敌机图片() ' Image = Ew_down_image rt_count = 1 EE_left_image = Ew_left_image EE_rightT_image = Ew_right_image EE_up_image = Ew_up_image EE_down_image = Ew_down_image Select Case Me.E_TYPE Case EnemyTank_Class.EnemyTank_DirectionType.EnemyTank_UpType Me.Image = Me.Ew_up_image Case EnemyTank_Class.EnemyTank_DirectionType.EnemyTank_DownType Me.Image = Me.Ew_down_image Case EnemyTank_Class.EnemyTank_DirectionType.EnemyTank_LeftType Me.Image = Me.Ew_left_image Case EnemyTank_Class.EnemyTank_DirectionType.EnemyTank_RightType Me.Image = Me.Ew_right_image End Select End Sub Public Sub 敌机炸后初始化() Dim rt As New Random() Select Case rt.Next(1, 5) Case 1 Image = Ew_down_image rt_count = 1 EE_left_image = Ew_left_image EE_rightT_image = Ew_right_image EE_up_image = Ew_up_image EE_down_image = Ew_down_image Case 2 Image = Ey_down_image rt_count = 2 EE_left_image = Ey_left_image EE_rightT_image = Ey_right_image EE_up_image = Ey_up_image EE_down_image = Ey_down_image Case 3 Image = Eg_down_image rt_count = 3 EE_left_image = Eg_left_image EE_rightT_image = Eg_right_image EE_up_image = Eg_up_image EE_down_image = Eg_down_image Case 4 Image = Egt_down_image rt_count = 4 EE_left_image = Egt_left_image EE_rightT_image = Egt_right_image EE_up_image = Egt_up_image EE_down_image = Egt_down_image End Select isTimeSet = False e_direction = 0 '用来表示敌机的AI only_oneBoolen = True Dim rrt As New Random em_rt_count = rrt.Next(1, 11) 子弹是否拼撞 = False 子弹是否第一次发射 = True E_TYPE = EnemyTank_DirectionType.EnemyTank_DownType E_BUT_TYPE_Direction = E_BUT_DirectionType.Enemy_BUT_DownType End SubEnd Class
下载vb坦克大战 小游戏源码用户还喜欢
- 18480 文章数
- 500万+ 热度
作者专栏
编辑推荐
- 淡抹u2引擎,修复内容较多,物有所值
- 界域传说·经典巨作=传世单机(一键安装)
- 丸子版本(175个传世版本大集合)
- GS版本:神话公益服务端+客户端
- 图片放大工具(放大图片不模糊)
- 剪映无限制VIP版
- 传奇世界客户端下载器,史上最全传世客户端
- 传世GS20220920商业引擎注册+登录配置器 解压密码是1
- U2官方排行榜游戏网关 支持元神,支持传家宝
- GS开战传世客户端+服务端
- (淡漠夕阳)u2引擎合区工具
- 传世GS引擎消除“你的游戏客户端版本号过旧,请及时更新”提示
- 传世一机多区双线路配置器--免密码版本
- 传世凤凰登陆器劫持修复软件
- SQLite3 for Navicat
- 传奇世界npc对话框编辑工具
- 传世GS落霞铭文服务器端
- gs_20210409引擎包+注册机(无限制)
- 传奇世界NPC对话封包查看器[支持时长版和极速版]
- 彩虹引擎传世脚本编辑工具1.7版来了,支持函数脚本翻译
评论